module game {
    //房间列表单个游戏场
    export class HallRoomTypePanel extends eui.Component {
        public constructor(data) {
            super();
            this.skinName = "resource/ui/game/HallRoomTypeSkin.exml";
            this.init(data)
        }
        public bg: eui.Image;
        public state: eui.Image;
        public difen: eui.Label;
        public ruchangfen: eui.Label;
        private init(data) {
            this.state.source = ""// Math.random() > 0.5 ? "roomstate_2" : "roomstate_3"
            this.difen.text = "底注：" + data.lCellScore / 100;
            this.ruchangfen.text = "入场：" + data.lEnterScore / 100;
            var color;
            var source;
            if (data.wKindID == InstructionsEnum.GAME_SERVER_ID.BRNN) {//白人牛牛
                if (data.wServerLevel == 1 || data.wServerLevel == 10) {
                    color = 0xa3ff99
                    source = "roomList_4b"
                }
                if (data.wServerLevel == 2 || data.wServerLevel == 11) {
                    color = 0xfff179
                    source = "roomList_10b"
                }
                if (data.wServerLevel == 3 || data.wServerLevel == 12) {
                    color = 0xfff179
                    source = "roomList_10b"
                }
            } else {
                if (data.wServerLevel == 1 || data.wServerLevel == 10) {
                    color = 0xa3ff99
                    source = "roomList_cjf"
                }
                if (data.wServerLevel == 2 || data.wServerLevel == 11) {
                    color = 0x99d3ff
                    source = "roomList_zjf"
                }
                if (data.wServerLevel == 3 || data.wServerLevel == 12) {
                    color = 0xfff179
                    source = "roomList_gjf"
                }
                //体验
                if (data.wServerLevel == 0 || data.wServerLevel == 9) {
                    color = 0xa3ff99
                    source = "roomList_cjf"
                }
            }
            if (source && color) {
                this.bg.source = source;
                this.difen.textColor = color
                this.ruchangfen.textColor = color
            }
        }
    }
}